package com.huacx.service.impl;

import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.huacx.mapper.UserMapper;
import com.huacx.model.File;
import com.huacx.model.User;
import com.huacx.service.UserService;
@Service  
@Transactional 
public class UserServiceImpl implements UserService{
	@Resource
	private UserMapper mapper;
	
	public int deleteByPrimaryKey(Integer tId) {
		return mapper.deleteByPrimaryKey(tId);
	};

	public int insert(User record) {
		return mapper.insert(record);
	};

	public int insertSelective(User record) {
		return mapper.insertSelective(record);
	};

	public List<User> selectByPrimaryKey(Integer tId) {
		return mapper.selectByPrimaryKey(tId);
	};
	
	public List<User> selectAll() {
		List<User> findAllList = mapper.selectAll();
		return findAllList;
	};

	public int updateByPrimaryKeySelective(User record) {
		return mapper.updateByPrimaryKeySelective(record);
	};

	public int updateByPrimaryKey(User record) {
		return mapper.updateByPrimaryKey(record);
	};
	
	public int allCount() {
		return mapper.allCount();
	}
	
	public List<User> selectByPage(Map searchMap){
		return mapper.selectByPage(searchMap);
	}
	
	public int getPageCount(String searchMap) {
		return mapper.getPageCount(searchMap);
	};
	
	public void addImgSrc(Map mp) {
		mapper.addImgSrc(mp);
	};
	
	public List<File> getImgList() {
		return mapper.getImgList();
	};
	
	public List<File> getImgListByName(String name){
		return mapper.getImgListByName(name);
	};
	
	public List<File> getImgListByGroup(){
		return mapper.getImgListByGroup();
	};
	
	public String login(Map mp){
		return mapper.login(mp);
	};
	
	public String checkTel(String tel) {
		return mapper.checkTel(tel);
	};
	
	public List<User> selectByTel(String tel){
		return mapper.selectByTel(tel);
	};
	
	public int delImg(Map mp) {
		return mapper.delImg(mp);
	};
	
	public String getRealAddr(Map mp) {
		return mapper.getRealAddr(mp);
	};
	
	public List<File> getImgListByNameGroup(String name){
		return mapper.getImgListByNameGroup(name);
	};
}
